package com.wenguo.bussines.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wenguo.bussines.dao.LogDao;
import com.wenguo.bussines.model.Log;
import com.wenguo.bussines.service.LogService;

@Service
public class LogServiceImpl implements LogService {
	
	@Autowired private LogDao logDao;

	@Override
	public List<Log> findLogByPage(Map<Object, Object> map) {
		return logDao.getByDefined(map);
	}

	@Override
	public Long findLogCount(Log log) {
		return Long.parseLong(logDao.getCount(log).toString());
	}

	@Override
	public List<Log> findLogByEntity(Log log) {
		return logDao.getByEntity(log);
	}

	@Override
	public boolean insertLog(Log log) {
		return logDao.save(log);
	}

}
